Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tokio_util): Stabilise JoinMap #7075

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

conradludgate
Copy link
Contributor

Motivation

The other day I saw someone asking for JoinMap to be stabalised. I happened to notice just now that the task ID system is now stable in tokio.

Solution

Removes the unstable config requirement for tokio_util::JoinMap.

@conradludgate conradludgate force-pushed the conrad/stabalise-joinmap branch 2 times, most recently from eb9f646 to 5155239 Compare January 6, 2025 15:35
@conradludgate conradludgate changed the title feat: Stabalise JoinMap feat(tokio_util): Stabalise JoinMap Jan 6, 2025
@Darksonn Darksonn added A-tokio-util Area: The tokio-util crate M-task Module: tokio/task labels Jan 6, 2025
@conradludgate conradludgate force-pushed the conrad/stabalise-joinmap branch from 5155239 to 91695b2 Compare January 6, 2025 15:45
@@ -43,8 +43,6 @@ futures-util = { version = "0.3.0", optional = true }
pin-project-lite = "0.2.11"
slab = { version = "0.4.4", optional = true } # Backs `DelayQueue`
tracing = { version = "0.1.29", default-features = false, features = ["std"], optional = true }

[target.'cfg(tokio_unstable)'.dependencies]
hashbrown = { version = "0.14.0", default-features = false, optional = true }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. I'll have to think about what implications this has for our MSRV.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hashbrown 0.14.0 has a rust-version = "1.64.0".
hashbrown 0.15.2 has a rust-version = "1.65.0".

It doesn't seem to have an explicit MSRV policy, but it is inline with tokio-util's 1.70.0

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm okay with this, but I don't want to require hashbrown if you're just using the TaskTracker. Can you add a join_map feature?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems reasonable. Will do

@Darksonn Darksonn changed the title feat(tokio_util): Stabalise JoinMap feat(tokio_util): Stabilise JoinMap Jan 8, 2025
Comment on lines 103 to 99
#[cfg_attr(docsrs, doc(cfg(all(feature = "rt", tokio_unstable))))]
#[cfg_attr(docsrs, doc(cfg(feature = "rt")))]
pub struct JoinMap<K, V, S = RandomState> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once you add the join_map feature, this annotation may not be necessary. Please try removing it and checking the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio-util Area: The tokio-util crate M-task Module: tokio/task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants